<style>
    td.left {text-align: left;}
    td.right {text-align: right;}
</style>
<div>
    
    #set(total=0.0)
    #for(x : totalcusthours)
        #set(total=x.xTotalHour)
    #end
    <h1 style="text-align:center">各客户完成工时 总工时:#number(total,"0.#")h</h1>
    <div style="margin-top:2em;margin-bottom:2em;text-align:center;">
        <table class="gradienttable" border="1" style="width:100%;line-height:2em;margin-left:auto;margin-right:auto;">
            <tr>
                <th style="width:3em;" rowspan="2">序号</th>
                <th rowspan="2">客户</th>
                <th style="width:6em;" rowspan="2">完成工时h</th>
                <th style="width:5em;" rowspan="2">占比%</th>
                <th style="width:5em;" rowspan="2">成本</th>
                <th colspan="#(mans.size())">工时h</th>
                <th colspan="#(mans.size())">占比%</th>
            </tr>
            <tr>
                #for(x:mans)
                    <th style="width:3em;">#(x.xName)</th>
                #end
                #for(x:mans)
                    <th style="width:3em;">#(x.xName)</th>
                #end
            </tr>
            #for(x : totalcusthours)
                <tr>
                    <td>#(for.count)</td>
                    <td>#(x.xCust)</td>
                    <td>#number(x.xHour, "0.#")</td>
                    <td>#number(x.xRate, "0.#")</td>
                    <td>&nbsp;</td>
                    #for(m:mans)
                        #set(finded=false)
                        #for(y : devcusthours)
                            #if(y.xMan==m.xName && y.xCust==x.xCust)
                                <td>#number(y.xHour, "0.#")</td>
                                #set(finded=true)
                            #end
                        #end
                        #if(!finded)
                            <td>&nbsp;</td>
                        #end
                    #end
                    
                    #for(m:mans)
                        #set(finded=false)
                        #for(y : devcusthours)
                            #if(y.xMan==m.xName && y.xCust==x.xCust)
                                <td>#if(x.xHour>0) #number(y.xHour * 100.0 / x.xHour, "0.#") #else 0 #end</td>
                                #set(finded=true)
                            #end
                        #end
                        #if(!finded)
                            <td>&nbsp;</td>
                        #end
                    #end
                </tr>
            #end
        </table>
    </div>


    <h1 style="text-align:center">分开发各客户完成工时</h1>
    
    <div style="margin-top:2em;margin-bottom:2em;text-align:center;">
        <table class="gradienttable" border="1" style="width:50em;line-height:2em;margin-left:auto;margin-right:auto;">
            <tr>
                <th style="width:3em;">序号</th>
                <th style="width:6em;">开发</th>
                <th style="width:7em;">开发总工时h</th>
                <th>客户</th>
                <th style="width:6em;">完成工时h</th>
                <th style="width:5em;">占比%</th>
                <th style="width:5em;">成本</th>
            </tr>
            #for(man : mans)
                #set(idx=0)
                #for(x : devcusthours)
                    #if(x.xMan==man.xName)
                        #set(idx=idx+1)
                        <tr>
                            <td>#(idx)</td>
                            <td>#(x.xMan)</td>
                            <td>#number(x.xTotalHour, "0.3")</td>
                            <td>#(x.xCust)</td>
                            <td>#number(x.xHour, "0.#")</td>
                            <td>#number(x.xRate, "0.#")</td>
                            <td>&nbsp;</td>
                        </tr>
                    #end
                #end
            #end
            
        </table>
    </div>


    
    #set(total=0.0)
    #for(x : totalemergencycusthours)
        #set(total=x.xTotalHour)
    #end
    <h1 style="text-align:center">本周紧急任务各客户完成工时 总工时:#number(total,"0.#")h</h1>
    <div style="margin-top:2em;margin-bottom:2em;text-align:center;">
        <table class="gradienttable" border="1" style="width:100%;line-height:2em;margin-left:auto;margin-right:auto;">
            <tr>
                <th style="width:3em;" rowspan="2">序号</th>
                <th rowspan="2">客户</th>
                <th style="width:6em;" rowspan="2">完成工时h</th>
                <th style="width:5em;" rowspan="2">占比%</th>
                <th style="width:5em;" rowspan="2">成本</th>
                <th colspan="#(mans.size())">工时h</th>
                <th colspan="#(mans.size())">占比%</th>
            </tr>
            <tr>
                #for(x:mans)
                    <th style="width:3em;">#(x.xName)</th>
                #end
                #for(x:mans)
                    <th style="width:3em;">#(x.xName)</th>
                #end
            </tr>
            #for(x : totalemergencycusthours)
                <tr>
                    <td>#(for.count)</td>
                    <td>#(x.xCust)</td>
                    <td>#number(x.xHour, "0.#")</td>
                    <td>#number(x.xRate, "0.#")</td>
                    <td>&nbsp;</td>
                    #for(m:mans)
                        #set(finded=false)
                        #for(y : devcusthours)
                            #if(y.xMan==m.xName && y.xCust==x.xCust)
                                <td>#number(y.xHour, "0.#")</td>
                                #set(finded=true)
                            #end
                        #end
                        #if(!finded)
                            <td>&nbsp;</td>
                        #end
                    #end
                    
                    #for(m:mans)
                        #set(finded=false)
                        #for(y : devcusthours)
                            #if(y.xMan==m.xName && y.xCust==x.xCust)
                                <td>#if(x.xHour>0) #number(y.xHour * 100.0 / x.xHour, "0.#") #else 0 #end</td>
                                #set(finded=true)
                            #end
                        #end
                        #if(!finded)
                            <td>&nbsp;</td>
                        #end
                    #end
                </tr>
            #end
        </table>
    </div>

    <h1 style="text-align:center">本周紧急任务分开发各客户完成工时</h1>
    <div style="margin-top:2em;margin-bottom:2em;text-align:center;">
        <table class="gradienttable" border="1" style="width:50em;line-height:2em;margin-left:auto;margin-right:auto;">
            <tr>
                <th style="width:3em;">序号</th>
                <th style="width:6em;">开发</th>
                <th style="width:7em;">开发总工时h</th>
                <th>客户</th>
                <th style="width:6em;">完成工时h</th>
                <th style="width:5em;">占比%</th>
                <th style="width:5em;">成本</th>
            </tr>
            #for(man : mans)
                #set(idx=0)
                #for(x : devemergencycusthours)
                    #if(x.xMan==man.xName)
                        #set(idx=idx+1)
                        <tr>
                            <td>#(idx)</td>
                            <td>#(x.xMan)</td>
                            <td>#number(x.xTotalHour,"0.#")</td>
                            <td>#(x.xCust)</td>
                            <td>#number(x.xHour, "0.#")</td>
                            <td>#number(x.xRate, "0.#")</td>
                            <td>&nbsp;</td>
                        </tr>
                    #end
                #end
            #end
            
        </table>
    </div>



</div>



